package com.groupseven.happycampus.common.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


@Data
@AllArgsConstructor
@NoArgsConstructor
public class OwnCommodity {
    /**
     * 个人上架商品表	own_Commodity:
     * id(序号)	id(上架商品id)
     * commodity_name(上架商品名)
     * picture(图片)	price(价格)
     * appeared_date(上架时间)
     * status(商品状态 是否已购买 boolean)
     *
     */
    private Integer id;
    private CommodityType type;// 也可以设置为 enum 类
    private String commodityName;
    private String pic;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date appearedDate;
    private Integer price;
    private Integer quantity;
    private Integer commodityId;
    private Boolean status;
    private String productDescription;
}
